/*
 * Copyright 2007-2010 VTT Biotechnology
 * This file is part of DP.
 *
 * DP is free software; you can redistribute it and/or modify it under the
 * terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 *
 * DP is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * DP; if not, write to the Free Software Foundation, Inc., 51 Franklin St,
 * Fifth Floor, Boston, MA 02110-1301 USA
 */
package PD.data.impl.peaklists;

import PD.data.Row;

/**
 *
 * @author SCSANDRA
 */
public class SimpleNodeRow implements Row {

        int id, lowerBound, upperBound;
        double weight;
        String vertexType, SWISSprotID, KEGGCompoundID, TransPathID;

        public int getID() {
                return id;
        }

        public void setID(int id) {
                this.id = id;
        }

        public double getWeight() {
                return this.weight;
        }

        public int getLowerBound() {
                return this.lowerBound;
        }

        public int getUpperBound() {
                return this.upperBound;
        }

        public String getVertexType() {
                return this.vertexType;
        }

        public String getSWISSprotID() {
                return this.SWISSprotID;
        }

        public String getKEGGCompoundID() {
                return this.KEGGCompoundID;
        }

        public String getTransPathCompoundID() {
                return this.TransPathID;
        }

        public void setWeight(double weight) {
                this.weight = weight;
        }

        public void setLowerBound(int lowerBound) {
                this.lowerBound = lowerBound;
        }

        public void setUpperBound(int upperBound) {
                this.upperBound = upperBound;
        }

        public void setVertexType(String vertexType) {
                this.vertexType = vertexType;
        }

        public void setSWISSprotID(String SWISSprotID) {
                this.SWISSprotID = SWISSprotID;
        }

        public void setKEGGCompoundID(String KEGGCompoundID) {
                this.KEGGCompoundID = KEGGCompoundID;
        }

        public void setTransPathCompoundID(String transPathCompoundID) {
                this.TransPathID = transPathCompoundID;
        }

        public int getSourceVertexID() {
                throw new UnsupportedOperationException("Not supported yet.");
        }

        public int getTargetVertexID() {
                throw new UnsupportedOperationException("Not supported yet.");
        }

        public String getDirection() {
                throw new UnsupportedOperationException("Not supported yet.");
        }

        public String getSourceDatabases() {
                throw new UnsupportedOperationException("Not supported yet.");
        }

        public void setSourceVertexID(int sourceID) {
                throw new UnsupportedOperationException("Not supported yet.");
        }

        public void setTargetVertexID(int targetID) {
                throw new UnsupportedOperationException("Not supported yet.");
        }

        public void setDirection(String direction) {
                throw new UnsupportedOperationException("Not supported yet.");
        }

        public void setSourceDatabases(String sourceDB) {
                throw new UnsupportedOperationException("Not supported yet.");
        }

        @Override
        public Row clone() {
                SimpleNodeRow newRow = new SimpleNodeRow();
                newRow.setID(this.getID());
                newRow.setWeight(this.getWeight());
                newRow.setSWISSprotID(this.getSWISSprotID());
                newRow.setKEGGCompoundID(this.getKEGGCompoundID());
                newRow.setTransPathCompoundID(this.getTransPathCompoundID());
                newRow.setUpperBound(this.getUpperBound());
                newRow.setLowerBound(this.getLowerBound());
                newRow.setVertexType(this.getVertexType());
                return newRow;
        }

        @Override
        public String toString() {
                String text = "\n\tnode [\n\t\tid " + getID() + "\n\t\tlabel";
                if (!getKEGGCompoundID().contains("null")) {
                        text += " \"ID: " + getID() + ", " + getKEGGCompoundID() + ", " + getWeight() + "\"\n";
                } else if (!getSWISSprotID().contains("null")) {
                        text += " \"ID: " + getID() + ", " + getSWISSprotID() + ", " + getWeight() + "\"\n";
                } else {
                        text += " \"ID: " + getID() + ", " + getWeight() + "\"\n";
                }
                text += "\t]";
                return text;
        }
}
